﻿@*@model IEnumerable<PilotProject.Candidate>*@
@model PilotMVC.Models.ManageCandidateView
<link href="../../Content/tables.css" rel="stylesheet" type="text/css" />
<link href="../../Content/items1/forms.css" rel="stylesheet" type="text/css" />
@{
    Layout = "~/Views/Shared/_AdminLayout.cshtml";
}

@using (@Html.BeginForm())
 {     
<div id="search">  
<fieldset> 
<legend>Search For a Candidate</legend>

         <label>JPA<span class="small">Search by JPA</span></label>   
         <div> <p>@Html.TextBox("jpa")</p></div>  
           
         <label>First Name<span class="small">Search by first name</span></label>
         <div> <p>@Html.TextBox("firstName")</p></div>
           
         <label>Last Name<span class="small">Search by last name</span></label>
         <div> <p>@Html.TextBox("lastName")</p></div>

          <p class="posp"><input type="submit" value="Search" class="searchbt"/> </p>
</fieldset>
       
</div>
} 
 

 <div id="data">

 <div class="datagrid">
	<table  width="900px;" >
     @if(@Model.Candidates !=null)
    {
    <thead>
         <tr>
            <th>
                JPA
            </th>  
            <th>
                FirstName
            </th>
            <th>
                LastName
            </th>
            <th>
                Mobile
            </th>
            <th>
                Telephone
            </th>
            <th>
                Email
            </th>     

            <th>Edit</th>
        </tr>
     </thead>   
     <tfoot><tr><td colspan="7"><div id="no-paging">&nbsp;</div></tr></tfoot>
      <tbody>  
        @foreach (var item in Model.Candidates)
        {
         <tr>
            <td>
                @Html.DisplayFor(modelItem => item.JPA)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.FirstName)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.LastName)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Mobile)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Telephone)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Email)
            </td>
            <td>
                <a href="@Url.Action("Edit", "Candidate", new { id = item.Id })" ><img alt="Edit" src="../../Content/items1/img/rte/editIco.png" /> </a>
            </td>
        </tr>
        }
          </tbody> 
    }

</table>

</div>
</div>
<div class="clear"></div>

